﻿@model object
@{
    if (ViewData.ModelMetadata.Model != null && string.IsNullOrEmpty(ViewData.ModelMetadata.Model.ToString())&&ViewData.ModelMetadata.ConvertEmptyStringToNull)
    {
        ViewData.ModelMetadata.Model = null;
    }
}
<tr>
    <th>
        <label for="@ViewData.ModelMetadata.PropertyName">
            @ViewData.ModelMetadata.GetDisplayName().Localize()</label>
        @if (!string.IsNullOrEmpty(ViewData.ModelMetadata.Description))
        {
            <a href="#" class="tooltip-link" title="@ViewData.ModelMetadata.Description "></a>
        }
    </th>
    <td>
        @if (ViewData.ModelMetadata.Model == null && !string.IsNullOrEmpty(ViewData.ModelMetadata.NullDisplayText))
        {
            <span class="gray">@ViewData.ModelMetadata.NullDisplayText</span>
        }
        else
        {
            <span class="gray">@ViewData.ModelMetadata.Model</span>
        }
    </td>
</tr>
